package top.zuli.package01.class04;

public class ArrayDemo11 {
    public static void main(String[] args) {
        int[][] arr = new int[10][];
        for (int y = 0; y < arr.length; y++) {
            arr[y] = new int[y+1];
            arr[y][0] = arr[y][y] = 1;
            for (int x = 1; x < arr[y].length-1; x++) {
                arr[y][x] = arr[y-1][x-1] + arr[y-1][x];
            }
        }
        for (int[] ints : arr) {
            for (int anInt : ints) {
                System.out.print(anInt + "\t");
            }
            System.out.println();
        }
    }
}
